package com.sunma.web.controller.common;

import com.sunma.common.core.domain.AjaxResult;
import com.sunma.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * 验证码操作处理
 */
@RestController
public class CaptchaEnabledController {
    @Autowired
    private ISysConfigService configService;

    /**
     * 获取验证码开关
     */
    @GetMapping("/captchaEnabled")
    public AjaxResult captchaEnabled() {
        AjaxResult ajax = AjaxResult.success();
        boolean captchaEnabled = configService.selectCaptchaEnabled();
        ajax.put("captchaEnabled", captchaEnabled);
        return ajax;
    }

}
